home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / emacs.lha / emacs-19.16 / src / s / usg5-4.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-18  |  5.4 KB  |  186 lines

  1. /* Definitions file for GNU Emacs running on AT&T's System V Release 4
  2.    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU Emacs.
  5.  
  6. GNU Emacs is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU Emacs is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU Emacs; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* This file written by James Van Artsdalen of Dell Computer Corporation.
  21.  * james@bigtex.cactus.org.  Subsequently improved for Dell 2.2 by Eric
  22.  * S. Raymond <esr@snark.thyrsus.com>.
  23.  */
  24.  
  25. /* Use the SysVr3 file for at least base configuration. */
  26.  
  27. #include "usg5-3.h"
  28.  
  29. #define USG5_4
  30.  
  31. /* We do have multiple jobs.  Handle ^Z. */
  32.  
  33. #undef NOMULTIPLEJOBS
  34.  
  35. #define LIBS_SYSTEM -lsocket -lnsl -lelf
  36. #define ORDINARY_LINK
  37.  
  38. #ifdef ORDINARY_LINK
  39. #define LIB_STANDARD -lc /usr/ucblib/libucb.a
  40. #else
  41. #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
  42. #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
  43. #endif
  44.  
  45. /* there are no -lg libraries on this system, and no libPW */
  46.  
  47. #define LIBS_DEBUG
  48. #define LIBS_STANDARD -lc
  49.  
  50. /* No <sioctl.h> */
  51.  
  52. #define NO_SIOCTL_H
  53.  
  54. /* Undump with ELF */
  55.  
  56. #undef COFF
  57.  
  58. #define UNEXEC unexelf.o
  59.  
  60. /* Get FIONREAD from <sys/filio.h>.  Get <sys/ttold.h> to get struct
  61.  * tchars. But get <termio.h> first to make sure ttold.h doesn't
  62.  * interfere.  And don't try to use SIGIO yet.
  63.  */
  64.  
  65. #ifdef emacs
  66. #include <sys/filio.h>
  67. #include <termio.h>
  68. #include <sys/ttold.h>
  69. #include <signal.h>
  70. #include <sys/wait.h>
  71. #include <sys/stream.h>
  72. #include <sys/stropts.h>
  73. #include <sys/termios.h>
  74. #undef SIGIO
  75. #endif
  76.  
  77. /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
  78.  * instead, there's a system variable _sys_nsig.  Unfortunately, we need the
  79.  * constant to dimension an array.  So wire in the appropriate value here.
  80.  */
  81.  
  82. #ifndef NSIG
  83. #define NSIG    32
  84. #endif
  85.  
  86. /* libc has this stuff, but not utimes. */
  87.  
  88. #define HAVE_SELECT
  89. #define HAVE_TIMEVAL
  90.  
  91. /* <sys/stat.h> *defines* stat(2) as a static function.  If "static"
  92.  * is blank, then many files will have a public definition for stat(2).
  93.  */
  94.  
  95. #undef static
  96.  
  97. /* We need bss_end from emacs.c for undumping */
  98.  
  99. #ifndef USG_SHARED_LIBRARIES
  100. #define USG_SHARED_LIBRARIES
  101. #endif
  102.  
  103. /* We can support this */
  104.  
  105. #define CLASH_DETECTION
  106.  
  107. #define HAVE_PTYS
  108. #define HAVE_SETSID
  109. #define HAVE_TERMIOS
  110.  
  111. /* It is possible to receive SIGCHLD when there are no children
  112.    waiting, because a previous waitsys(2) cleaned up the carcass of child
  113.    without clearing the SIGCHLD pending info.  So, use a non-blocking
  114.    wait3 instead, which maps to waitpid(2) in SysVr4. */
  115.  
  116. #define HAVE_WAIT_HEADER
  117. #define WAITTYPE int
  118. #define wait3(status, options, rusage) \
  119.   waitpid((pid_t) -1, (status), (options))
  120. #define WRETCODE(w) (w >> 8)
  121.  
  122. /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
  123.    subprocesses the usual way.  But TIOCSIGNAL does work for PTYs, and
  124.    this is all we need.  */
  125.  
  126. #define TIOCSIGSEND TIOCSIGNAL
  127.  
  128. /* This change means that we don't loop through allocate_pty too many
  129.    times in the (rare) event of a failure. */
  130.  
  131. #undef FIRST_PTY_LETTER
  132. #define FIRST_PTY_LETTER 'z'
  133.  
  134. /* This sets the name of the master side of the PTY. */
  135.  
  136. #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
  137.  
  138. /* This sets the name of the slave side of the PTY.  On SysVr4,
  139.    grantpt(3) forks a subprocess, so keep sigchld_handler() from
  140.    intercepting that death.  If any child but grantpt's should die
  141.    within, it should be caught after sigrelse(2). */
  142.  
  143. #define PTY_TTY_NAME_SPRINTF            \
  144.   {                        \
  145.     char *ptsname(), *ptyname;            \
  146.                         \
  147.     sighold(SIGCLD);                \
  148.     if (grantpt(fd) == -1)            \
  149.       fatal("could not grant slave pty");    \
  150.     sigrelse(SIGCLD);                \
  151.     if (unlockpt(fd) == -1)            \
  152.       fatal("could not unlock slave pty");    \
  153.     if (!(ptyname = ptsname(fd)))        \
  154.       fatal ("could not enable slave pty");    \
  155.     strncpy(pty_name, ptyname, sizeof(pty_name)); \
  156.     pty_name[sizeof(pty_name) - 1] = 0;        \
  157.   }
  158.  
  159. /* Push various streams modules onto a PTY channel. */
  160.  
  161. #define SETUP_SLAVE_PTY \
  162.   if (ioctl (xforkin, I_PUSH, "ptem") == -1)    \
  163.     fatal ("ioctl I_PUSH ptem", errno);        \
  164.   if (ioctl (xforkin, I_PUSH, "ldterm") == -1)    \
  165.     fatal ("ioctl I_PUSH ldterm", errno);    \
  166.   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
  167.     fatal ("ioctl I_PUSH ttcompat", errno);
  168.  
  169. /* Undo the SVr3 X11 library definition */
  170. #undef LIB_X11_LIB
  171.  
  172. /* The definition of this in s-usg5-3.h is not needed in 5.4.  */
  173. /* liblnsl_s should never be used.  The _s suffix implies a shared
  174.    library, as opposed to a DLL.  Share libraries were used in SVR3, and are
  175.    available only in order to allow SVR3 binaries to run.  They should not be
  176.    linked in to new binaries. -- caraway!pinkas@caraway.intel.com.  */
  177. #undef LIBX10_SYSTEM
  178. #undef LIBX11_SYSTEM
  179.  
  180. /* Tell x11term.c and keyboard.c we have the system V streams feature.  */
  181. #define SYSV_STREAMS
  182.  
  183. /* This definition was suggested for next release.
  184.    So give it a try.  */
  185. #define HAVE_SOCKETS
  186.